---
title: "Elastic Search Java Client"
date: 2019-10-21
categories:
- elasticsearch
tags:
---

<div id="content">
<div id="table-of-contents">
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<li><a href="#orgf700aaa">索引管理</a>
<ul>
<li><a href="#org0e04f64">删除索引</a></li>
</ul>
</li>
</ul>
</div>
</div>
<div class="outline-2" id="outline-container-orgf700aaa">
<h2 id="orgf700aaa">索引管理</h2>
<div class="outline-text-2" id="text-orgf700aaa">
<div class="org-src-container">
<pre class="src src-java"><span style="font-weight: bold; text-decoration: underline;">IndicesAdminClient</span> <span style="font-weight: bold; font-style: italic;">indicesAdminClient</span> = client.admin().indices();
</pre>
</div>
</div>
<div class="outline-3" id="outline-container-org0e04f64">
<h3 id="org0e04f64">删除索引</h3>
<div class="outline-text-3" id="text-org0e04f64">
<div class="org-src-container">
<pre class="src src-java"><span style="font-weight: bold; text-decoration: underline;">DeleteIndexRequest</span> <span style="font-weight: bold; font-style: italic;">request</span> = <span style="font-weight: bold;">new</span> <span style="font-weight: bold; text-decoration: underline;">DeleteIndexRequest</span>();
request.indices(INDEX_NAME);
client.admin().indices().delete(request);
</pre>
</div>
</div>
</div>
</div>
</div>
<div class="status" id="postamble">
<p class="date">Date: 2019-10-21</p>
<p class="author">Author: gdme1320</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
